[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Halt Halts Program Execution and Returns Error Code
Halt; [TP]
Halt(ErrCode : Integer); [TP]
Halts program execution and returns to the Turbo Pascal menu (if you
are running under Turbo Pascal) or MS-DOS (if you are executing a .COM
file). Halt may also optionally pass an integer parameter that
specifies the return code of the program (If no parameter is
specified, 0 is assumed). The return code can be tested by a parent
process or by MS-DOS's ERRORLEVEL batch testing.
-------------------------------- Example ---------------------------------
if FileNotFound then Halt; { Exit with an error code of 0 }
if DirNotFound then Halt(1); { Exit with an error code of 1 }
See Also:
Exit
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson